<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script language=javascript>

//转载请保留出处 http://www.dwww.cn 
function unselectall(){
	if(document.myform.chkAll.checked){
		document.myform.chkAll.checked = document.myform.chkAll.checked&0;
	}
}
function CheckAll(form){
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if (e.Name != 'chkAll'&&e.disabled==false)
			e.checked = form.chkAll.checked;
	}
}
</script>

</head>
<body>
<form name="myform" method="post" id="myform" action="" >
<input name='id' type='checkbox' onclick='unselectall()' id='id' value='1'> 设计家园
<input name='id' type='checkbox' onclick='unselectall()' id='id' value='2'> 网页教程
<input name='id' type='checkbox' onclick='unselectall()' id='id' value='3'> 酷站欣赏
<input name='id' type='checkbox' onclick='unselectall()' id='id' value='4'> 网页素材
<input name='chkAll' type='checkbox' id='chkAll' onclick='CheckAll(this.form)' value='checkbox'>
全选
</form>
</body>
</html>